package com.open.chat;

import com.open.core.NettyServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication(scanBasePackages = {"com.open"})
public class ChatServerApplication implements CommandLineRunner {

    public static void main(String[] args) {
        log.info("启动项目成功: http://localhost:8080/");
        SpringApplication.run(ChatServerApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("启动Netty服务器...");
        NettyServer.start();
    }
}
